#ifndef HISTOGRAM_H
#define HISTOGRAM_H

#include "data.h"

class Histogram {
    public:
        Histogram();
        Histogram(Data *);
        Histogram(double *);
        ~Histogram();

        void setMinMax();

        double getP(int);
        double getNormalizedP(int);

        double getMean();           //média
        void setMean();

        double getVariance();           //segundo momento - variancia
        void setVariance();


        double thirdMoment();           //terceiro momento (calculado so mente quando necessario
        double uniformity();           //terceiro momento (calculado so mente quando necessario
        double entropy();           //terceiro momento (calculado so mente quando necessario

        void calculate(Data *);

    private:
        double normalize(double, double, double, double, double);

        double *p;
        double max, min, mean, variance;
};

#endif
